package com.java.lang;


public class CompareToDemo {
	public static void main(String[] args) {
		strSourt();
	}

	private static void strSourt() {
		String[] array = { "a", "c", "b", "ss", "s", "Abc", "123", "1", "2",
				"1aasd" };
		String temp;
		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array.length; j++) {
				if (array[i].compareTo(array[j]) < 0) {
					temp = array[i];
					array[i] = array[j];
					array[j] = temp;
				}

			}
		}

		for (String string : array) {
			System.out.println(string);

		}
	}

}
